#include <stdio.h>
#include <signal.h>
#include <unistd.h>

void handler(int sig) {
	    printf("\nReceived SIGINT (Ctrl+C). Ignored.\n");
}

int main() {
	    signal(SIGINT, handler);  // 注册处理函数
	        while (1) {
			        printf("Running... Press Ctrl+C to test.\n");
				        sleep(1);
					    }
		    return 0;
}
